#include "KameraManipulator.h"

bool KameraManipulator::kameraAuswahl(const GUIEventAdapter& ea, SceneGraphHandler* sceneHandler){
	switch(ea.getKey()){
		case '1':
			sceneHandler->viewer.setCameraManipulator( NULL );
			sceneHandler->viewer.getCamera()->setAllowEventFocus(false);
			sceneHandler->setEyeX(sceneHandler->getEyeX());
			sceneHandler->cameraManipulatorText->setText("Eigener Manipulatoar");
			return false;
			break;
		case '2':
			sceneHandler->viewer.setCameraManipulator( (new TrackballManipulator()) );
			sceneHandler->cameraManipulatorText->setText("Trackball Manipulator");
			return false;
			break;
		case '3':
			sceneHandler->viewer.setCameraManipulator( (new FirstPersonManipulator()) );
			sceneHandler->cameraManipulatorText->setText("First Person Manipulator");
			sceneHandler->viewer.getCameraManipulator()->setHomePosition(Vec3(100.0,50.0,100.0),Vec3(0.0,0.0,0.0),Vec3(0.0,0.0,1.0));
			sceneHandler->viewer.getCameraManipulator()->home(0);
			return false;
			break;
		case '4':
			sceneHandler->viewer.setCameraManipulator( (new DriveManipulator()) );
			sceneHandler->cameraManipulatorText->setText("Drive Manipulator");
			return false;
			break;
		case '5':
			sceneHandler->viewer.setCameraManipulator( (new TerrainManipulator()) );
			sceneHandler->cameraManipulatorText->setText("Terrain Manipulator");
			return false;
			break;
		case '6':
			sceneHandler->viewer.setCameraManipulator( (new FlightManipulator()) );
			sceneHandler->cameraManipulatorText->setText("Flight Manipulator");
			return false;
			break;
		case '7':
			sceneHandler->viewer.setCameraManipulator( (new NodeTrackerManipulator()) );
			sceneHandler->cameraManipulatorText->setText("Node Tracker Manipulator");
			return false;
			break;
		case '8':
			sceneHandler->viewer.setCameraManipulator( (new UFOManipulator()) );
			sceneHandler->cameraManipulatorText->setText("U-F-O Manipulator");
			return false;
			break;
		case '9':
			sceneHandler->viewer.setCameraManipulator( (new SphericalManipulator()) );
			sceneHandler->cameraManipulatorText->setText("Spherical Manipulator");
			return false;
			break;
		case '0':
			sceneHandler->viewer.setCameraManipulator( (new MultiTouchTrackballManipulator()) );
			sceneHandler->cameraManipulatorText->setText("Multi Touch Trackball Manipulator");
			return false;
			break;
		case 'p':
			sceneHandler->viewer.setCameraManipulator( (new OrbitManipulator()) );
			sceneHandler->cameraManipulatorText->setText("Orbit Manipulator");
			return false;
			break;
		default:
			return false;
	}
}
